<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>注册</title>
	<link rel="stylesheet" href="css/zhuce.css">
	<link rel="stylesheet" href="css/reset.css">
	<style>
    .bg{
    	background-image: url(images/微信图片_20190304190606.png);
    background-repeat: no-repeat;
    background-color: #b8e5f8;
    background-size: cover;
    width: 100%;
    height: 100vh;
    overflow: auto;
    padding-right: 15px;
    }
    body{
    	 overflow-x : hidden;   /*去掉横条*/
     /*overflow-y : hidden;   去掉竖条*/
    }
	</style>
</head>
<body>
<form action="{% url 'zhuce2' %}" method="post">
    	<div class="bg">
		<div class="zhucebox">
			<p class="logo">知乎</p>
			<span class="box1" >注册知乎,发现更多可信赖的解答</span>
			<br>
			<br>
                   账号：<input type="text" placeholder="请输入您要注册的账号" name="username"><br><br><br>
        密码：<input type="password" placeholder="请输入您要注册的密码" name="password"><br><br><br>
        <a href="{% url 'denglu' %}"><input type="submit" value="注册" id="in"></a>

    <div class="b1"><a href="{% url 'denglu' %}">返回登录</a></div>

			<!-- <button class="yuyin">接收语音验证码</button> -->


			<div class="yinsi">
				<span>注册即代表同意《知乎协议》《隐私保护指引》&nbsp&nbsp&nbs<a href="#" style="color:blue;">注册机构号</a></span>
			</div>

			  <div class="switch">
            	<p>已有账号？<a href="#">登录</a></p>
            </div>
		</div>

		<div class="footer">
		<div class="zhihulinks">
			<p>知乎专栏·圆桌·发现·移动应用·联系我们·来知乎工作·注册机构号</p>
		</div>
		<div class="zhihulinks1">
			<p>
© 2019 知乎·京 ICP 证 110745 号·京公网安备 11010802010035 号出版物经营许可证
			</p>
		</div>
		<div class="zhihulinks2">
		<p>
侵权举报·网上有害信息举报专区·儿童色情信息举报专区·违法和不良信息举报：010-82716601</p>
		</div>
		<div class="zhihulinks3">
			<img src="images/chengxing_logo@2x.65dc76e8.png" alt="">
		</div>
	</div>

</form>

	
</body>
</html>
<script>
    // 验证手机号
//    手机号是不是11位
//    手机号前2位以18、15、13、14开始，后9位为数字
    var phone=document.getElementById("phone");
    var btn=document.getElementById("btn");
    btn.onclick=function () {
        var pv=phone.value;
        console.log(pv);
        var reg=/^(13|14|15|18)[0-9]{9}$/;
        //var reg=/^1[3458][0-9]{9}$/;
        if(reg.test(pv)){
            alert("请输入六位短信验证码");
        }else{
            alert("请输入正确的手机号");
        }
    }
</script>